package vn.edu.thptduongbachmai.common;

import com.vng.zing.configer.ZConfig;
import vn.edu.thptduongbachmai.model.SignInModel;

/**
 *
 * @author tiennv4
 */
public class Configuration {

    //TemplateManager
    public static String APP_DOMAIN;
    public static String APP_STATIC_DOMAIN;
    public static String APP_KEY_COOKIE;
    public static int APP_MAXSIZE_SESSION;
    public static int SERVER_PORT;
    public static String SERVER_HOST;
    public static String SERVER_RESOURCE_BASE;
    public static int SERVER_MAXTHREADS;

    static {
        //TemplateManager
        APP_DOMAIN = ZConfig.Instance.getString(TemplateManager.class, "templatemanager", "app_domain", "127.0.0.1");
        APP_STATIC_DOMAIN = ZConfig.Instance.getString(TemplateManager.class, "templatemanager", "static_domain", "127.0.0.1");
        APP_KEY_COOKIE = ZConfig.Instance.getString(TemplateManager.class, "templatemanager", "static_domain", "127.0.0.1");
        APP_MAXSIZE_SESSION = ZConfig.Instance.getInt(SignInModel.class, "session", "max_size", 100000);
        //ZappServer
//        SERVER_HOST = ZConfig.Instance.getString(ZAppServer.class,"thptduongbachmai","host","127.0.0.1");
//        SERVER_PORT =ZConfig.Instance.getInt(ZAppServer.class,"thptduongbachmai","port",901);
//        SERVER_MAXTHREADS = ZConfig.Instance.getInt(ZAppServer.class,"thptduongbachmai","maxthreads",1000);
//        SERVER_RESOURCE_BASE = ZConfig.Instance.getString(ZAppServer.class,"thptduongbachmai","resource_base","E:/thptbachmai/THPTDuongBachMai/assets");
    }
}
